home *** CD-ROM | disk | FTP | other *** search
- -- background: 3266 from stack: in
- -- bmap block id: 2694
- -- flags: 4000
- -- background id: 0
- -- name: Map
- ----- HyperTalk script -----
- on RetrieveAllData
- put empty into field "Status"
- show field "Status Backdrop"
- show field "Status"
- set cursor to 4
-
- send "ConnectToVax" to bkgnd "Region Data"
- if the result <> empty then
- wait 120 ticks
- else
- --send "EraseMap" to bkgnd "Map"
- send "GetDataForCard" && quote & "All Regions" & quote to card "All Regions"
-
- put "Stand by... Redrawing map" into field "Status"
- wait 45 ticks
- RedrawMap
- put "Data as of:" && the short date && the time into card field "Time & Date"
- end if
- hide field "Status"
- hide field "Status Backdrop"
- end RetrieveAllData
-
- on RedrawMap
- put 14 into maxDrag
- put AllRegionNums() into regions
- put AllRegionSales() into sales
- put maxItem (sales) into maxValue
- reset paint
- set textSize to 10
- set textStyle to bold
- set textAlign to center
- hide field "Status"
- hide field "Status Backdrop"
-
- -- This should go to the All Regions data card & get the region
- -- numbers. Then the buttons can be addressed by name.
- repeat with i = 1 to 5
- put item 1 of the loc of card btn i into x
- put item 2 of the loc of card btn i into y
- put y into baseLine
- put the short name of card btn i into regionNum
- set lockScreen to true
- go to card "Region" && regionNum && "Map"
- choose lasso tool
- doMenu "Select"
- doMenu "Opaque"
- doMenu "Copy Picture"
- go to card "Map of Regions"
- doMenu "Paste Picture"
- set lockScreen to false
- put item (itemOffset (regionNum, regions)) of sales into value
- put round (maxDrag * value / maxValue) into dragNum
- repeat dragNum
- drag from x, y to x, y-2 with optionKey
- subtract 2 from y
- end repeat
- choose text tool
- click at x,baseLine
- put "$" & addComma (value) into value
- type value
- end repeat
- choose browse tool
- end RedrawMap
-
- on EraseMap
- set lockScreen to true
- --create a dot so the card pict is not empty
- choose pencil tool
- click at 1,1
-
- choose select tool
- doMenu "Select"
- type NumToChar(8) -- the backspace character
- choose browse tool
- set lockScreen to false
- end EraseMap
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: A000
- -- rect: left=454 top=293 right=339 bottom=506
- -- title width / last selected line: 0
- -- icon id / first selected line: 2162 / 2162
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Main Menu
- ----- HyperTalk script -----
- on mouseUp
- visual dissolve
- go to card id 5341 of stack "Home"
- end mouseUp
-
-
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=5 top=283 right=314 bottom=171
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Region Data
- ----- HyperTalk script -----
- on mouseUp
- visual effect wipe right
- go to card "All Regions"
- end mouseUp
-
-
-
- -- part 8 (field)
- -- low flags: 80
- -- high flags: 2004
- -- rect: left=90 top=107 right=164 bottom=398
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Status Backdrop
-
-
- -- part 10 (field)
- -- low flags: 80
- -- high flags: 2000
- -- rect: left=90 top=121 right=155 bottom=397
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Status
-
-
- -- part 11 (button)
- -- low flags: 00
- -- high flags: A000
- -- rect: left=454 top=238 right=283 bottom=506
- -- title width / last selected line: 0
- -- icon id / first selected line: 9761 / 9761
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Setup
- ----- HyperTalk script -----
- on mouseUp
- visual dissolve
- go to card "Connect Setup"
- end mouseUp
-
-
-